package com.ap.core.domain;


import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import org.joda.time.LocalDateTime;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * User: Rohit.Dixit
 */
@Entity
@Table(name = "T_BANK")
@AttributeOverride(name = "id", column = @Column(name = "BANK_ID"))
@TypeDef(name = "id", typeClass = Long.class)
public class Bank extends Identifiable<Long> {

    private static final long serialVersionUID = 5180845106091590283L;

    @Column(name = "SHORT_NAME")
    private String shortName;

    @Column(name = "REGISTERED_NAME")
    private String registeredName;

    @Column(name = "THRESHOLD_AMOUNT")
    private Long thresholdAmount;


    @Column(name = "REGISTERED_DATE")
    @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime")
    private LocalDateTime subscriptionStartDate;


    @Column(name = "BANK_IDENTIFICATION")
    private String bankIdentification;


    private Bank() {
    }

    public String getShortName() {
        return shortName;
    }

    public String getRegisteredName() {
        return registeredName;
    }

    public Long getThresholdAmount() {
        return thresholdAmount;
    }

    public LocalDateTime getSubscriptionStartDate() {
        return subscriptionStartDate;
    }

    public String getBankIdentification() {
        return bankIdentification;
    }


}
